import pyautogui

def printPoint():
    # 打印鼠标位置.
    currentMouseX, currentMouseY = pyautogui.position();
    print("当前鼠标位置：", currentMouseX, currentMouseY);

    # 打印chrome图片位置.
    location = pyautogui.locateCenterOnScreen("chrome.png", confidence=0.9);
    if location is not None:
        print("chrome位置：",location.x, location.y);


if __name__ == '__main__':
    printPoint();